<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
function Person(opt){
    this._init(opt);
}

Person.prototype = {
    _init: function (opt){
        this.name = opt.name;
        this.age = opt.age;
        this.sex = opt.sex;
    },
    eat: function (){

    },
    speak: function (){

    }
}
var p1 = new Person({
    name: "lisi",
    age: 20,
    sex: "男"
})
var p2 = new Person({
    name: "zs",
    age: 30,
    sex: "女"
})
console.log(p1.name);
console.log(p2.name);
</script>
</body>
</html>